package sk.naive.talker.message;

import sk.naive.talker.User;
import sk.naive.talker.util.Utils;

import java.rmi.RemoteException;

/**
 * UserIgnoreExcluder.
 *
 * @author <a href="mailto:virgo@naive.deepblue.sk">Richard "Virgo" Richter</a>
 * @version $Revision: 1.1 $ $Date: 2004/02/24 00:14:54 $
 */
public class UserIgnoreExcluder implements UserExcluder {
	private User excluded;
	private Category category;

	public UserIgnoreExcluder(User excluded, Category category) {
		this.excluded = excluded;
		this.category = category;
	}

	public boolean isExcluded(User u) throws RemoteException {
		return (u == excluded) || Utils.isIgnoring(u, category);
	}
}
